/**
 * Bakalarska prace - Inteligentni budik
 * @package sleepCatcher
 * @file FormAlarmRepeat.h
 * @author Jan Pesava - xpesav00
 * @email xpesav00@stud.fit.vutbr.cz
 * @date 24. 12. 2011
 */

#ifndef FORMALARMREPEAT_H_
#define FORMALARMREPEAT_H_

#include <FBase.h>
#include <FUi.h>

#include "models/SCAlarm.h"

using namespace Osp::Base;
using namespace Osp::Ui::Controls;


class FormAlarmRepeat  :
	public Osp::Ui::Controls::Form,
	public Osp::Ui::IActionEventListener
{

// Construction
public:
	FormAlarmRepeat();
	virtual ~FormAlarmRepeat();

// Constants
	//static const int IDA_ALARM_CONFIRM 		= 200;
	static const int IDA_ALARM_BACK			= 201;
	static const int IDA_ONLYONCE_SET		= 202;
	static const int IDA_ONLYONCE_CANCEL	= 203;
	static const int IDA_EVERYDAY_SET		= 204;
	static const int IDA_EVERYDAY_CANCEL	= 205;
	static const int IDA_WEEKEND_SET		= 206;
	static const int IDA_WEEKEND_CANCEL		= 207;
	static const int IDA_WEEKDAYS_SET		= 208;
	static const int IDA_WEEKDAYS_CANCEL	= 209;
	static const int IDA_MONDAY_SET			= 210;
	static const int IDA_MONDAY_CANCEL		= 211;
	static const int IDA_TUESDAY_SET		= 212;
	static const int IDA_TUESDAY_CANCEL		= 213;
	static const int IDA_WEDNESDAY_SET		= 214;
	static const int IDA_WEDNESDAY_CANCEL	= 215;
	static const int IDA_THURSDAY_SET		= 216;
	static const int IDA_THURSDAY_CANCEL	= 217;
	static const int IDA_FRIDAY_SET			= 218;
	static const int IDA_FRIDAY_CANCEL		= 219;
	static const int IDA_SATURDAY_SET		= 220;
	static const int IDA_SATURDAY_CANCEL	= 221;
	static const int IDA_SUNDAY_SET			= 222;
	static const int IDA_SUNDAY_CANCEL		= 223;
// Attributes
	SCAlarm* pAlarm;
	SCAlarmRepeat* pAlarmRepeatBackup;
	ScrollPanel* pScrollPanel;
	CheckButton* pOnlyOnce;
	CheckButton* pEveryDay;
	CheckButton* pWeekdays;
	CheckButton* pWeekend;
	CheckButton* pMonday;
	CheckButton* pTuesday;
	CheckButton* pWednesday;
	CheckButton* pThursday;
	CheckButton* pFriday;
	CheckButton* pSaturday;
	CheckButton* pSunday;
// Methods
public:
	bool Initialize(void);
	virtual result OnInitializing(void);
	virtual result OnTerminating(void);
	virtual void OnActionPerformed(const Osp::Ui::Control& source, int actionId);
	void Cancel();
	void Save();
	void Update();
	void Redraw();
	int GetFormId();
	void SetAlarm(SCAlarm* pAlarm);
	SCAlarm* GetAlarm();
};

#endif /* FORMALARMREPEAT_H_ */
